home *** CD-ROM | disk | FTP | other *** search
- INTRODUCTION
-
- If you have been saying to yourself 'this computer is great!
- Look what I can do with this Neochrome! But alas ( heavy sigh ),
- I wish I had access to sprites .', then this program is for you.
- It is a raster sprite generator. That means that it makes sprites
- that can be any size or shape and have as many number of colors as
- the rest of your screen. The basic idea is that you use either
- Neochrome or Degas to design your sprites. Leave plenty of blank
- space around them. Then call up this program. It will give you
- some simple instructions and then prompt you for a filename. It
- will display your choice without using the new color palette
- information. This means that you will have to reserve some palette
- positions for your sprites when you design your background. You
- are limited to 16 colors in any case (lo-res). Run the mouse over
- to your sprite and 'drag' the left button to form a rubberbox
- around it. You will then be asked to name it. Once it has a name,
- the program will build and display a black and white mask for it.
- What actually gets saved to the disk is as follows:
-
- 2 bytes height
- 2 bytes width ( in 4 bytes units )
- x bytes sprite data
- x bytes mask data
- ,where 'x' equals the WIDTH * 4 * HEIGHT
-
- You can see what you have done by pressing the right mouse
- button. This invokes the demo routine. Press any key to get back
- into the edit mode. Once in the edit mode, you may exit the program
- by pressing both mouse buttons simultaniously.
-
- A QUICK WORD ABOUT MASKS
-
- Normally you would not need this mask. One assumes that most
- people will want to use the standard copy raster routine (vro_cpyfm).
- However, on those rare occasions when you want to avoid GEM ( or
- weren't given the choice-I can think of several Forth examples. )
- you can use these sprites with their masks. For your convenience,
- this is what I have done in this demo. These sprites are cut along
- 4 word ( 8 bytes ) boundaries. This means that you can avoid bit
- shifting if you want to and don't mind the positional limitations
- this implies.
- So how would one use these things? Well there are at least
- three ways. First, you could simply copy the sprite data to
- somewhere on the screen. This, unfortunately, leaves a large
- rectangular hole in your background with the sprite resting in the
- middle. This is okay, if your background is black. The second way,
- is to 'OR' each bit of the sprite with each corresponding bit of
- the background. This gets rid of the insidious black rectangle.
- But it does strange things to the colors of the sprite. This
- effect will be of interest to people who want to have 'ghosts'
- that walk through walls. The third way is to 'AND' the background
- with the mask first. This creats a hole into which the sprite will
- exactly fit when it gets 'OR'-ed with this product.
-
- THE CODE
-
- I have tryed to make this program as useful to the scavenger
- as possible. Many of these routines can be copyed whole or with
- slight modifications into your personal libraries. This keeps
- future code short and easier to write. With Haba Hippo C this is
- especially important. Even more so if you are working with half a
- meg of memory.
-
- A COPY OF THE C SOURCE CODE FOR THIS PROGRAM AND SEVERAL
- OTHER USEFUL ROUTINES AND PROGRAMS ARE AVAILABLE FOR $15 AND YOUR
- RETURN ADDRESS.($10 if you send your own disk.)You will have your
- copy within one week of the time I get your letter. ( You will
- also be on my mailing list for new programs in Megamax C and maybe
- Forth.)
-
- Send to:
-
- PETER BEERY /* This address is good */
- DEPT. OF PHYSICS /* year round. So don't */
- UNIVERSITY OF NOTRE DAME /* about the end of school */
- NOTRE DAME, INDIANA /* year. -PDB 5/1/86 */
- 46556
-
-
-
- GENERAL HABA HIPPO HINTS
-
- If you have trouble getting a program to compile, then
- try the following. Break the code into several pieces and compile
- each seperately. Then link them together as the last step. If you
- still are having trouble, then 'rename' the .acc part of your desk
- accessories to .acx and reboot your system. This frees memory for
- the compiler. If you have the one megabyte upgrade or if you own
- the 1040 ST then things will compile MUCH faster if you copy your
- haba hippo disk into a ramdisk and run from there. I personally
- don't know how I would survive without a ramdisk.( a factor of ten
- in speed at least!)
-
- the end.
- ∩
-